package com.huidatech.mpgdemo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Data;
import java.util.Date;
import java.util.List;

/**
* @DESC: 
* @author wangzhuangzhuang
* @date 2021-10-26 13:24
*/

@Data // 提供一系列常用方法： getter、setters、hashcode、equals
@Builder // 提供对象属性的链式赋值构建对象的方法
public class Article {
     @JsonIgnore
     private Long id;
     @JsonProperty("authorName")
     private String author;
     private String title;
     private String content;
     @JsonInclude(JsonInclude.Include.NON_NULL) // createTime不要为空
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
     private Date createTime;
     private List<Reader> readers;
}